﻿@model GameCode.Models.PhoneApp.IndexModel
@{
    ViewBag.Title = "游戏特权 - 游戏搜索";
    Layout = "~/Views/Shared/_Layout.cshtml";
    //Layout = null;
}
<ul class="listview">
    <!--游戏推荐-->
    @if (Model.GameProjectList.Count == 0)
    {
        <li><a href="#">
        <div class="gamelist_item">
            <div class="gamelist_item_more">
                没有找到您需要的游戏
            </div>
        </div>
        </a></li>
    }
    else
    {
    foreach (var game in Model.GameProjectList)
    {
        <li><a onclick="loadUrl('PhoneApp/Game?id=@game.ID')" href="#">
            <div class="gamelist_item">
                <div class="gamelist_item_left">
                    <img class="gamelist_item_img" alt="@game.GameName" src="@string.Format("http://{0}/{1}", Request.Url.Host, game.LogoLink == null ? "" : game.LogoLink)" />
                </div>
                <div class="gamelist_item_right">
                @if (game.State == "已领取")
                {
                    <div class="gamelist_item_status get">
                        已领取</div>
                }
                else
                {
                    <div class="gamelist_item_status noget">
                        未领取</div>
                }
                </div>
                <div class="gamelist_item_middle">
                    <h6 class="gamelist_item_name">
                        @game.GameName</h6>
                    <div class="gamelist_item_detail">
                        @game.GameDescription
                    </div>
                </div>
            </div>
            <div class="clear">
            </div>
        </a></li>
    }
    }
    <!--游戏推荐-->
    <!--更多游戏-->
    <li><a href="#" onclick="loadUrl('PhoneApp/GameClassify')">
        <div class="gamelist_item">
            <div class="gamelist_item_more">
                更多游戏
            </div>
        </div>
    </a></li>
    <!--更多游戏-->
</ul>
  <div class="clear"></div>